package com.whpost.api.controller.stamp;

import cn.dev33.satoken.stp.StpUtil;
import com.whpost.api.controller.BaseController;
import com.whpost.api.utils.ApiUtils;
import com.whpost.service.entity.tools.ResultInfo;
import com.whpost.service.service.stamp.StampHdServices;
import com.whpost.service.service.stamp.StampXmServices;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


@RestController
@RequestMapping("/stamp/hd")
public class StampHdController extends BaseController {

    @Resource
    private StampHdServices stampHdServices;

    @Autowired
    public StampHdController(StampHdServices stampHdServices) {
        super();
        setPerCode("stamphd");
        setBaseServices(stampHdServices);
    }


    /**
     * 获取活动
     * @return
     */
    @RequestMapping(value ="/get_hd_yl")
    public ResultInfo getHdYl(@RequestBody Map<String, Object> map){
        String loginId = ApiUtils.getLoginId();
        return stampHdServices.getHdYl(loginId,map);
    }

    /**
     * 获取活动
     * @return
     */
    @RequestMapping(value ="/mbquery")
    public ResultInfo mbquery(@RequestBody Map<String, Object> map){
        String loginId = ApiUtils.getLoginId();
        //StpUtil.checkPermission("stamphdmbdyb:add");
        return stampHdServices.mbquery(loginId,map);
    }

    /**
     * 模版删除
     * @return
     */
    @RequestMapping(value ="/mbdel")
    public ResultInfo mbdel(@RequestBody Map<String, Object> map){
        String loginId = ApiUtils.getLoginId();
        //StpUtil.checkPermission("stamphdmbdyb:add");
        return stampHdServices.mbdel(loginId,map);
    }
}
